package types

import (
	"time"
)

// RegisterRequest 用户注册请求
 type RegisterRequest struct {
	Username string `json:"username" validate:"required,min=3,max=32"`
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required,min=6,max=32"`
}

// RegisterResponse 用户注册响应
 type RegisterResponse struct {
	ID    int64  `json:"id"`
	Token string `json:"token"`
}

// LoginRequest 用户登录请求
 type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

// LoginResponse 用户登录响应
 type LoginResponse struct {
	ID    int64  `json:"id"`
	Token string `json:"token"`
}

// UserInfoRequest 用户信息请求
 type UserInfoRequest struct {
	UserID int64 `json:"user_id" validate:"required"`
}

// UserInfoResponse 用户信息响应
 type UserInfoResponse struct {
	ID        int64     `json:"id"`
	Username  string    `json:"username"`
	Email     string    `json:"email"`
	Avatar    string    `json:"avatar,omitempty"`
	Status    int64     `json:"status"`
	CreatedAt time.Time `json:"created_at"`
}